<template>
	<div id="">
		<img :src="house.imgUrl" style="width: 300px;display: inline-block;"/>
		<div v-for="item in imgUrlList" style="width: 300px;display: inline-block;">
			
			 <img :src="item.imgUrl"/>
		</div>
		<Card style="width:350px;left: 40%;">
			
				<h3>{{house.detailLocation}} </h3>
				<div class="hui">
					<span>户型:{{house.roomCount}}室</span><br>
					<span>面积:{{house.area}}m²</span><br>
					<span>朝向:{{house.chaoxiang}}</span><br>
					<span>楼层:{{house.louceng}}</span><br>
					<span>装修:{{house.zhuangxiu}}</span><br>
					<span>小区:{{house.xiaoqu}}</span><br>
					<span>商圈:{{house.pianqu}}</span><br>
					<span>发布人:{{house.personName}}</span><br>
					<span>电话号码:{{house.tel}}</span><br>
					<span>微信号:{{house.wxNumber}}</span><br>
					<span>
						<span v-if="house.dianti === 1" >电梯:有</span>
						<span v-if="house.dianti === 2" >电梯:无</span><br>
					</span>
					<span class="amount">￥{{house.leasePrice}}</span>
				</div>
			</Card>
		
	</div>
</template>

<script>
export default {
	data(){
		return{
			house:{},
			leaseId:2,
			imgUrlList:[],
		}
	},
	methods:{
		searchData: function() {
			console.log(11111111);
			this.http.get({
				url: "/house-lease-client-vo/info",
				param: {
					leaseId: this.$data.leaseId
				}
			}).then(data => {
				console.log(data);
				this.$data.house = data;
				console.log(this.$data.house.detailLocation)
			});
		},
		searchImg:function(){
			this.http.get({
				url:'/house/image/list',
				param:{
					houseAndLeaseId:this.$data.leaseId,
					type:1,
				}
			}).then(data => {
				this.$data.imgUrlList = data
				console.log(data)
			})
		},
		
	},
	created() {
		this.$data.leaseId = this.$route.params.leaseId
		this.searchData()
		this.searchImg()
	},
	beforeRouteLeave(to, from, next) {
	    this.$destroy();//手动销毁当前页面
	    next();
	},
}
</script>

<style>
</style>
